package com.IOC.beans;

import java.util.List;
import java.util.Map;

/**
 * bean工厂接口
 */
public interface BeanFactory {

    /**
     * 获取bean对象
     * @param beanName bean名称
     * @return bean实例对象
     * @throws Exception 通用异常
     */
    Object getBean(String beanName) throws Exception;

    <T> T getBean(Class<T> type) throws Exception;

    <T> Map<String, T> getBeanOfType(Class<T> type) throws Exception;

    <T> List<T> getBeanListOfType(Class<T> type) throws Exception;

    Class<?> getType(String beanName) throws Exception;


}
